/*
 *  $Id: TextPhrasePart.cs 1178 2010-11-09 18:14:43Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2010 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Languages.PhraseParts {
    /// <summary>
    /// Простая текстовая часть фразы.
    /// </summary>
    public class TextPhrasePart : PhrasePart {
        private string _text;

        public TextPhrasePart(string text) {
            _text = text;
        }

        public override void Build(PhraseBuilder builder, object[] args) {
            builder.Append(_text);
        }

        public override void BuildTemplate(PhraseBuilder builder) {
            builder.Append(_text);
        }

        public override string ToString() {
            return _text;
        }
    }
}